<%@tag description="Image Field input tag" pageEncoding="UTF-8"%>
<%@ include file="/taglibs.jsp" %>

<%@attribute name="name" required="true"%>
<%@ attribute name="path" required="false" %>


<c:set var="_imagepopupcnt" value="${_imagepopupcnt + 1}" scope="request"/>
<c:set var="_imagepopupfield" value="_imagepopupfield${_imagepopupcnt}"/>
<s:text id="${_imagepopupfield}" name="${name}" size="40"/>
<c:url var="url" value="Resource.action" >
    <c:param name="mode" value="popup"/>
    <c:param name="type" value="image"/>
    <c:param name="field" value="${_imagepopupfield}"/>
    <c:if test="${!(empty path)}">
        <c:param name="p" value="${path}"/>
    </c:if>
</c:url>
<%--<t:imgbtn src="imgs/search.gif" onclick="return popUpWindow('${url}','${_imagepopupfield}')" alt="Select Image"/>--%>
<t:imgbtn src="imgs/search.gif" onclick="showModal('${url}', 455, 350, '${_imagepopupfield}');" alt="Select Image"/>
